<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>地址识别 - 京东订单助手</title>
    <style>
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            width: 350px;
            padding: 20px;
            background-color: #f5f7fa;
            color: #333;
        }
        .popup-header {
            text-align: center;
            margin-bottom: 20px;
            color: #e02b29; /* 京东红 */
        }
        .input-container {
            margin-bottom: 20px;
        }
        textarea {
            width: 100%;
            height: 120px;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            resize: vertical;
            font-size: 14px;
            box-sizing: border-box;
            transition: border-color 0.3s;
        }
        textarea:focus {
            outline: none;
            border-color: #e02b29;
            box-shadow: 0 0 0 2px rgba(224, 43, 41, 0.2);
        }
        .button-container {
            display: flex;
            gap: 10px;
        }
        button {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 14px;
        }
        #fillBtn {
            background-color: #e02b29;
            color: white;
        }
        #fillBtn:hover {
            background-color: #c41a18;
            transform: translateY(-2px);
        }
        #clearBtn {
            background-color: #f0f0f0;
            color: #666;
            border: 1px solid #ddd;
        }
        #clearBtn:hover {
            background-color: #e0e0e0;
        }
        .status-message {
            margin-top: 15px;
            padding: 10px;
            border-radius: 4px;
            text-align: center;
            font-size: 13px;
            display: none;
        }
        .success {
            background-color: #e8f5e9;
            color: #2e7d32;
        }
        .error {
            background-color: #ffebee;
            color: #c62828;
        }
        .loading {
            color: #0288d1;
        }
    </style>
</head>
<body>
    <div class="popup-header">
        <h2>京东订单地址填充</h2>
    </div>
    
    <div class="input-container">
        <textarea id="addressInput" 
                  placeholder="请输入完整的收货地址信息（包含姓名、电话、省市区和详细地址）"></textarea>
    </div>
    
    <div class="button-container">
        <button id="fillBtn">填充到京东订单</button>
        <button id="clearBtn">清空</button>
    </div>
    
    <div id="statusMessage" class="status-message"></div>

    <script src="popup.js"></script>
</body>
</html>